package club.banyuan;

public enum Weekday {
    MONDAY("星期一"),TUESDAY("星期二"),WEDNESDAY("星期三"),THURSDAY("星期四"),FRIDAY("星期五"),SATURDAY("星期六"),SUNDAY("星期日");

    private String day;

    Weekday(String day) {
        this.day = day;
    }

    public boolean isWeekDay(){
//        return this == MONDAY || this == TUESDAY || this == WEDNESDAY || this == THURSDAY || this == FRIDAY;
        return ordinal()<SATURDAY.ordinal();
    }

    public boolean isHoliday(){
        return !isWeekDay();
    }


    @Override
    public String toString() {
        return this.day;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }
}
